#ifndef MENUITEM_H
#define MENUITEM_H

#include <QGraphicsPixmapItem>
#include <QGraphicsScene>
#include <QPixmap>

class MenuItem : public QObject, public QGraphicsPixmapItem
{
    Q_OBJECT

public:
    MenuItem(QPixmap normal, QPixmap over, QPixmap selected, QGraphicsScene *scene);

    void setActive(bool newState);

signals:
    void clicked(MenuItem * item);

protected:
    void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
    void mousePressEvent(QGraphicsSceneMouseEvent *event);

private:
    QPixmap pixmapNormal, pixmapOver, pixmapSelected, * pixmapCurrent;
    QGraphicsRectItem * itemBackground;

};

#endif // MENUITEM_H
